/*
 * Flame.h
 *
 *  Created on: 22-08-2012
 *      Author: szymon
 */

#ifndef FLAME_H_
#define FLAME_H_

#include <SDL/SDL.h>
#include "Screen.h"

const int FLAME_SPRITES_NUM = 8;
const int FLAME_WIDTH = 140;
const int FLAME_HEIGHT = 100;

class Flame
{
public:
	enum Direction
	{
		left,
		right
	};
private:
	int offsetX, offsetY;
	int velocity;
	int frame;
	enum Direction	direction;
	//The areas of the sprite sheet
	SDL_Rect clipsRight[FLAME_SPRITES_NUM];
	SDL_Rect clipsLeft[FLAME_SPRITES_NUM];
	//Flame and screen surface
	SDL_Surface *flameSurface;
	Screen *screen;

private:
	void setClips(void);

public:
	Flame(Screen * screen, int offsetX, int offsetY, enum Flame::Direction direction);
	~Flame();

	void move();
	void show();
	bool finished();
};


#endif /* FLAME_H_ */
